package com.mv.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mv.pojo.Deal;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface DealMapper extends BaseMapper<Deal> {
    @Select("select sum(money_change) from deal")
    Double getMoneySum();
    @Select("select sum(money_change) from deal where transaction=0")
    Double getConsumeMoneySum();
    @Select("select sum(money_change) from deal where transaction=1")
    Double getRechargeMoneySum();
    @Select("select sum(integral_change) from deal where transaction=0")
    Integer getConsumeIntegralSum();
}
